Release 10.1A: OpenEdge Data Management:
SQL Reference


SUBSTRING (ODBC compatible)

Returns the substring of the character string corresponding to the first argument starting at start_pos and length characters long. If the third argument length is not specified, the substring starting at start_pos up to the end of char_expression is returned.

Syntax

SUBSTRING ( char_expression, start_pos [ , length ] )  

Example

This example illustrates the SUBSTRING function:

SELECT last_name, '(', SUBSTRING (phone, 1, 3) , ')', 
          SUBSTRING (phone, 4, 3), '-',  
          SUBSTRING (phone, 7, 4) 
  FROM customer ; 

Notes

Compatibility

ODBC compatible


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095